﻿using System;
using System.Windows;
using System.Windows.Threading;
using Microsoft.Devices.Sensors;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using FarseerPhysics.Dynamics;
using System.Diagnostics;
using FarseerPhysics;

namespace GameName1
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class RoboChallengeGame : Game
    {

        //Singleton
        private static RoboChallengeGame _instance;

        public static RoboChallengeGame Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new RoboChallengeGame();
                }
                return _instance;
            }
        }

        GraphicsDeviceManager _graphics;
        ScreenManager _screenManager;

        public SpriteBatch SpriteBatch { get; private set; }
        
        //Change this depending on your WP8 device (don't forget to add the supported resolution in the project's WMAppManifest.xml file)
        //Possible resolutions are 800x480(wvga), 1280x768(wxga), 1280x720(720p)

        /*const int buttonHeight = 120; 
        const int buttonWidth = 120; 
        const int buttonMargin = 15; 


        public static int screenHeight = 1280;
        public static int screenWidth = 768;

        public static Vector2 ScreenCenter 
        {
            get
            {
                return new Vector2(screenWidth/2, screenHeight/2);
            }
            set
            {

            }
        }*/



        public RoboChallengeGame()
        {
            _graphics = new GraphicsDeviceManager(this);
            
            Content.RootDirectory = "Content";

            _screenManager = new ScreenManager(this);
            Components.Add(_screenManager);

            // Activate the first screens. 
             //_screenManager.AddScreen(new BattleScreen(), null); 
            //_screenManager.AddScreen(new LoadingScreen(), null);
            GameScreen[] screensToLoad = {
                new BattleScreen()
            };
            LoadingScreen.Load(_screenManager, screensToLoad);
             //_screenManager.AddScreen(new MainMenuScreen(), null); 

        }

        protected override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
        }

    }
}
